package com.example.common.entity;

import lombok.*;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.*;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

@Table(name = "sys_operating_log")
@Entity //告诉JPA这是一个实体类（和数据表映射的类）
@Data
public class OperatingLog implements Serializable {

	private static final long serialVersionUID = -8898084727959183997L;
	@Id
	@Column(name = "id_bigint", columnDefinition = "bigint(20)")
	private Long id;
	@Column(name = "uid_bigint", columnDefinition = "bigint(20)")
	private Long uid;
	@Column(name = "o_type_tinyint", columnDefinition = "tinyint(1) comment '1:登录,2:增加,3:修改,4:删除'")
	private Integer oType;
	@Column(name = "create_time_datetime", columnDefinition = "datetime(3)")
	private Date createTime;
	@Column(name = "operating_txt_nvarchar", columnDefinition = "text")
	private String operatingTxt;
}
